home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / perl5 / Env.z / Env
Encoding:
Text File  |  1998-10-30  |  1.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. EEEEnnnnvvvv((((3333))))                                                                  EEEEnnnnvvvv((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Env - perl module that imports environment variables
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.          use Env;
  13.          use Env qw(PATH HOME TERM);
  14.  
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      Perl maintains environment variables in a pseudo-hash named %ENV.  For
  18.      when this access method is inconvenient, the Perl module Env allows
  19.      environment variables to be treated as simple variables.
  20.  
  21.      The _E_n_v::_i_m_p_o_r_t() function ties environment variables with suitable names
  22.      to global Perl variables with the same names.  By default it does so with
  23.      all existing environment variables (keys %ENV).  If the import function
  24.      receives arguments, it takes them to be a list of environment variables
  25.      to tie; it's okay if they don't yet exist.
  26.  
  27.      After an environment variable is tied, merely use it like a normal
  28.      variable.  You may access its value
  29.  
  30.          @path = split(/:/, $PATH);
  31.  
  32.      or modify it
  33.  
  34.          $PATH .= ":.";
  35.  
  36.      however you'd like.  To remove a tied environment variable from the
  37.      environment, assign it the undefined value
  38.  
  39.          undef $PATH;
  40.  
  41.  
  42. AAAAUUUUTTTTHHHHOOOORRRR
  43.      Chip Salzenberg <_c_h_i_p@_f_i_n._u_u_c_p>
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.